package streamAPI;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;

public class filter_map_flatMap_2_3 {
	public static void main(String[] args) {
		List<String> list=new ArrayList<>();
		list.add("aa");list.add("BB");list.add("cc");
		Stream<String> stream = list.stream();
//		过滤：fileter的入参是predicate<T>对象，即一个从T到boolean的函数
//		Stream<String> longStream = stream.filter(w->w.length()>12);
//		筛选内容
	/*	Stream<String> map = stream.map(String::toLowerCase);
		map.forEach(System.out::println);*/
//		获取第一个字母
		/*Stream<Character> firstChars=stream.map(s-> s.charAt(0));
		firstChars.forEach(System.out::println);*/
	}
}
